export default {
    namespaced: true,
    state: {
        isShowToast: false,
        // 提示的内容
        toasMsg: '手机号',
        // 提示类型
        toastType: '类型'

    },
    mutations: {
        changeIsShowToast(state, payload) {

            state.isShowToast = payload.isshow;
            if (payload.isshow) {
                state.toasMsg = payload.msg;
                state.toastType = payload.type;
            }

        }
    },
    actions: {
        asynChangeIsShowToast(context, payload) {
            // console.log("asynChangeIsShowToast");
            context.commit('changeIsShowToast', payload);

            setTimeout(() => {
                context.commit('changeIsShowToast', {
                    isshow: false,
                });
            }, 1500);
        }
    }
}